package com.XDApp.xdbase.fragment;

import com.XDApp.xdbase.R;
import com.XDApp.xdbase.activitys.MyListActivity;
import com.XDApp.xdbase.utils.Logger;

import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.Button;

public class MyFragment extends XDBaseFragment implements OnClickListener {

	private static final String TAG = "MyFragment";
	private Button btn_fragment_my_openlist;
	private View inflate;

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		inflate = inflater.inflate(R.layout.fragment_my, container, false);
		btn_fragment_my_openlist = (Button) inflate.findViewById(R.id.btn_fragment_my_openlist);
		if (btn_fragment_my_openlist == null) {
			Logger.i(TAG, "btn_fragment_my_openlist :"+btn_fragment_my_openlist);
		}else{
			Logger.i(TAG, "btn_fragment_my_openlist :"+btn_fragment_my_openlist);
			btn_fragment_my_openlist.setOnClickListener(this);
		}
		return inflate;
	}
	
	@Override
	public void onActivityCreated(Bundle savedInstanceState) {
		super.onActivityCreated(savedInstanceState);
	}

	@Override
	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.btn_fragment_my_openlist:
			Intent intent = new Intent(mContext, MyListActivity.class);
			Logger.i(TAG, "开启listview");
//			intent.setClass(mContext, MyListActivity.class);
			startActivity(intent);
			break;
		default:
			break;
		}
	}
}
